package IOService;

        import dao.CommodityDao;
        import pojo.Commodity;
        import pojo.CommodityList;

        import java.util.Iterator;
        import java.util.List;

public class ShowService implements IOService{
    @Override
    public void work(CommodityList commodityList) {
        CommodityDao bookDao = new CommodityDao();
        List show = null;
        try {
            show = bookDao.Show();
        } catch (Exception var6) {
            var6.printStackTrace();
        }
        Iterator var4 = show.iterator();

        while(var4.hasNext()) {
            Commodity b = (Commodity) var4.next();
            System.out.println(b);
        }

    }
//        for (int i=0;i<commodityList.getCommdityCount();i++){
//            Commodity commodities = commodityList.getCommodities(i);
//            System.out.println(commodities);
//        }
//    }

}
